From: Jan Beulich Date: Thu, 28 Sep 2017 15:09:21 +0000 (-0600) Subject: x86: mmio_ro_do_page_fault() must be unreachable for DomU X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1240 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=7efab948acd1c1092b1a9e7b3be2a97389911bc5;p=xen.git x86: mmio_ro_do_page_fault() must be unreachable for DomU When combining PTWR and MMIO-R/O PV page fault handlers, the need for a second hwdom check was overlooked. Signed-off-by: Jan Beulich Reviewed-by: Wei Liu --- diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c index 53a3c15a31..6b2976d3df 100644 --- a/xen/arch/x86/pv/ro-page-fault.c +++ b/xen/arch/x86/pv/ro-page-fault.c @@ -346,7 +346,8 @@ int pv_ro_page_fault(unsigned long addr, struct cpu_user_regs *regs) if ( ((l1e_get_flags(pte) & (_PAGE_PRESENT | _PAGE_RW)) != _PAGE_PRESENT) ) return 0; - mmio_ro = rangeset_contains_singleton(mmio_ro_ranges, l1e_get_pfn(pte)); + mmio_ro = is_hardware_domain(currd) && + rangeset_contains_singleton(mmio_ro_ranges, l1e_get_pfn(pte)); if ( mmio_ro ) rc = mmio_ro_do_page_fault(&ctxt, addr, pte); else